import 'package:equatable/equatable.dart';
import 'package:learning_content_admin_pannel.core/core/domain/entities/page_models/app_navigator_page_model.dart';
import 'package:learning_content_admin_pannel.core/core/domain/utils/uuid_generator.dart';

class SingleWordTranslationPageModel extends Equatable implements AppNavigatorPageModel {
  SingleWordTranslationPageModel({
    String? id,
    required this.wordId,
  }) : id = id ?? UuidGenerator().generateUuid();

  @override
  final String id;

  final String wordId;

  @override
  bool get permittedWithAuthorization => true;

  @override
  bool get permittedWithoutAuthorization => false;

  @override
  List<Object?> get props {
    return [
      id,
    ];
  }

  @override
  SingleWordTranslationPageModel copyWith({
    String Function()? id,
    String Function()? wordId,
  }) {
    return SingleWordTranslationPageModel(
      id: id == null ? this.id : id(),
      wordId: wordId == null ? this.wordId : wordId(),
    );
  }
}
